package com.ict.luxshare.btservice;

import android.bluetooth.BluetoothAdapter;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class BtReceiver extends BroadcastReceiver {
    private final static String TAG = "BtService:REC";
    private Context mContext;
    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        mContext = context;
        //找到設備
        if (Intent.ACTION_BOOT_COMPLETED.equals(action)) {
            Log.d(TAG, "BOOT completed()");
            mContext.startActivity(new Intent(mContext, Main2Activity.class));
        }
        else if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action)) //搜索完成
        {
            Log.d(TAG, "ACTION_STATE_CHANGED scan");
        }
    }
}
